from datetime import datetime
from sqlmodel import SQLModel


class UserCreate(SQLModel):
    username: str
    password: str
    age: int | None = None
    email: str
    is_active: bool = True
    is_superuser: bool = False


class UserUpdate(SQLModel):
    username: str | None = None
    password: str | None = None
    age: int | None = None
    email: str | None = None
    is_active: bool = True
    is_superuser: bool = False


class UserResponse(SQLModel):
    id: int
    username: str
    age: int | None = None
    email: str
    is_active: bool
    is_superuser: bool
    created_at: datetime
    updated_at: datetime
